home *** CD-ROM | disk | FTP | other *** search
/ Champak 119 / (Vol 119) Nov 09 2010.iso / TGKI-109 / Games / fratboy_girlfriend_tower_defense.swf / scripts / DefineButton2_1646 / BUTTONCONDACTION on(release).as
Text File  |  2010-11-09  |  1KB  |  18 lines

  1. on(release){
  2.    _root.gold += sellSum;
  3.    _root.map[Math.round(eval("_root.tower" + _root.activeTower)._y / _root.cellSize) - 1][Math.round(eval("_root.tower" + _root.activeTower)._x / _root.cellSize) - 1] = 1;
  4.    _root.map[Math.round(eval("_root.tower" + _root.activeTower)._y / _root.cellSize) - 2][Math.round(eval("_root.tower" + _root.activeTower)._x / _root.cellSize) - 1] = 1;
  5.    _root.map[Math.round(eval("_root.tower" + _root.activeTower)._y / _root.cellSize) - 1][Math.round(eval("_root.tower" + _root.activeTower)._x / _root.cellSize) - 2] = 1;
  6.    _root.map[Math.round(eval("_root.tower" + _root.activeTower)._y / _root.cellSize) - 2][Math.round(eval("_root.tower" + _root.activeTower)._x / _root.cellSize) - 2] = 1;
  7.    if(towerType == 5)
  8.    {
  9.       _root.towerCost[5][0] -= 25;
  10.    }
  11.    eval("_root.tower" + _root.activeTower).swapDepths(99999);
  12.    removeMovieClip(eval("_root.tower" + _root.activeTower));
  13.    _root.snsr.swapDepths(99999);
  14.    _root.snsr.removeMovieClip();
  15.    this.swapDepths(99999);
  16.    removeMovieClip(this);
  17. }
  18.